package com.hh.workflow.action;

import org.springframework.beans.factory.annotation.Autowired;

import com.hh.system.util.base.BaseAction;
import com.hh.workflow.service.impl.ActivitiService;

@SuppressWarnings("serial")
public class ActionActiviti extends BaseAction {
	@Autowired
	private ActivitiService activitiService;
	private String dataId;
	private boolean  cascade;

	public void deploy() throws Exception {
		activitiService.deploy(dataId);
	}

	public void queryProcessDefinition() {
		this.returnResult(activitiService.queryProcessDefinition());
	}
	
	public void deleteProcessDefinitions() {
		activitiService.deleteProcessDefinitions(this.getIds(),cascade);
	}
	
	public String getDataId() {
		return dataId;
	}

	public void setDataId(String dataId) {
		this.dataId = dataId;
	}

	public boolean isCascade() {
		return cascade;
	}

	public void setCascade(boolean cascade) {
		this.cascade = cascade;
	}

}
